netfilter: nf_tables: GC transaction race with netns dismantle
authorSasha Levin <sashal@kernel.org>
Fri, 22 Sep 2023 16:30:20 +0000 (18:30 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Fri, 29 Sep 2023 04:15:31 +0000 (05:15 +0100)
commitd3649c77aa247cfe7d2a1220550e3c4c693370a3
treeaac60af629c9dc8e8530e7521812c33bbafd5572
parent940e758ba7d277bce8e04bf2ad76be6645e9e9f7
netfilter: nf_tables: GC transaction race with netns dismantle

commit 02c6c24402bf1c1e986899c14ba22a10b510916b upstream.

Use maybe_get_net() since GC workqueue might race with netns exit path.

Fixes: 5f68718b34a5 ("netfilter: nf_tables: GC transaction API to avoid race with control plane")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name netfilter-nf_tables-gc-transaction-race-with-netns-d.patch
net/netfilter/nf_tables_api.c